Populated.
authorFederico Mena Quintero <federico@redhat.com>
Thu, 4 Nov 1999 08:14:32 +0000 (08:14 +0000)
committerArturo Espinosa <unammx@src.gnome.org>
Thu, 4 Nov 1999 08:14:32 +0000 (08:14 +0000)
1999-11-04  Federico Mena Quintero  <federico@redhat.com>

* doc/tmpl/gdk-pixbuf.sgml: Populated.

* doc/tmpl/refcounting.sgml: Populated.

* doc/tmpl/file-loading.sgml: Populated.

* src/gdk-pixbuf.c: Added documentation comments.

* src/gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): Added
documentation comments.

docs/reference/gdk-pixbuf/tmpl/creating.sgml
docs/reference/gdk-pixbuf/tmpl/file-loading.sgml
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-io.sgml
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml
docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf.sgml
docs/reference/gdk-pixbuf/tmpl/gnome-canvas-pixbuf.sgml
docs/reference/gdk-pixbuf/tmpl/refcounting.sgml
docs/reference/gdk-pixbuf/tmpl/rendering.sgml
gdk-pixbuf/ChangeLog
gdk-pixbuf/gdk-pixbuf-io.c
gdk-pixbuf/gdk-pixbuf.c

index fa110239ab624e6472f41745eb4c3b75d09ef306..f6c303566fc96a6692dbf90d5737c940882ce086 100644 (file)
@@ -1,21 +1,19 @@
 <!-- ##### SECTION Title ##### -->
-creating
+Creating a Pixbuf from Data in Memory
 
 <!-- ##### SECTION Short_Description ##### -->
-
+Creating a pixbuf from image data that is already in memory.
 
 <!-- ##### SECTION Long_Description ##### -->
-<para>
-
-</para>
+  <para>
 
+  </para>
 
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### FUNCTION gdk_pixbuf_new_from_art_pixbuf ##### -->
 <para>
 
@@ -62,4 +60,9 @@ creating
 @data: 
 @Returns: 
 
-
+<!--
+Local variables:
+mode: sgml
+sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
+End:
+-->
index d26f8758551c8b00a09dfe2538f3e2f73363dc32..9fcf2ea5c8b4f44af2bb59c7a41e8dfacd0b2c3d 100644 (file)
@@ -1,20 +1,29 @@
 <!-- ##### SECTION Title ##### -->
-file-loading
+File Loading
 
 <!-- ##### SECTION Short_Description ##### -->
-
+Loading a pixbuf from a file.
 
 <!-- ##### SECTION Long_Description ##### -->
-<para>
-
-</para>
-
+  <para>
+    The GdkPixbuf library provides a simple mechanism for loading an
+    image from a file in synchronous fashion.  This means that the
+    library takes control of the application while the file is being
+    loaded; from the user's point of view, the application will block
+    until the image is done loading.
+  </para>
+
+  <para>
+    This interface can be used by applications in which blocking is
+    acceptable while an image is being loaded.  It can also be used to
+    load small images in general.  Applications that need progressive
+    loading can use the #GdkPixbufLoader functionality instead.
+  </para>
 
 <!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
+  <para>
+    #GdkPixbufLoader
+  </para>
 
 <!-- ##### FUNCTION gdk_pixbuf_new_from_file ##### -->
 <para>
@@ -24,4 +33,9 @@ file-loading
 @filename: 
 @Returns: 
 
-
+<!--
+Local variables:
+mode: sgml
+sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
+End:
+-->
index 4a2aa5478ed70ddc145bfdb713f6f5a16a9c0347..ecb5a5bad7d14232d334fd7d90efdb9674ce58c1 100644 (file)
@@ -9,13 +9,11 @@ gdk-pixbuf-io
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### USER_FUNCTION ModulePreparedNotifyFunc ##### -->
 <para>
 
index 3dc9606b2f1436d5f66acd53e2878071bb10634c..56af53f7d8bfe0de1558eb750361ae4dad511ef2 100644 (file)
@@ -9,13 +9,11 @@ GdkPixbufLoader
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### MACRO GDK_PIXBUF_LOADER ##### -->
 <para>
 
index 8f95817ea0449f760388a92a2e2e2f9ba38cde6a..0276b40cb965ee304a5437eb545ad2f49a2bc631 100644 (file)
@@ -1,36 +1,41 @@
 <!-- ##### SECTION Title ##### -->
-gdk-pixbuf
+The GdkPixbuf Structure
 
 <!-- ##### SECTION Short_Description ##### -->
-
+Information that describes an image.
 
 <!-- ##### SECTION Long_Description ##### -->
-<para>
-
-</para>
 
+  <para>
+    The <structname>GdkPixbuf</structname> structure contains
+    information that describes an image in memory.  It is actually a
+    simple wrapper that adds reference counting capabilities to an
+    #ArtPixBuf structure.
+  </para>
 
 <!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
+  <para>
+    #ArtPixBuf
+  </para>
 
 <!-- ##### STRUCT GdkPixbuf ##### -->
-<para>
+  <para>
+    This is the main structure in the GdkPixbuf library.  This
+    structure adds reference counting capabilities to an #ArtPixBuf
+    structure.
+  </para>
 
-</para>
-
-@ref_count: 
-@art_pixbuf: 
+@ref_count: Reference count.
+@art_pixbuf: An #ArtPixBuf that actually contains the description of
+the image data.
 
 <!-- ##### FUNCTION gdk_pixbuf_get_format ##### -->
 <para>
 
 </para>
 
-@pixbuf: 
-@Returns: 
+@pixbuf:
+@Returns:
 
 
 <!-- ##### FUNCTION gdk_pixbuf_get_n_channels ##### -->
@@ -38,8 +43,8 @@ gdk-pixbuf
 
 </para>
 
-@pixbuf: 
-@Returns: 
+@pixbuf:
+@Returns:
 
 
 <!-- ##### FUNCTION gdk_pixbuf_get_has_alpha ##### -->
@@ -47,8 +52,8 @@ gdk-pixbuf
 
 </para>
 
-@pixbuf: 
-@Returns: 
+@pixbuf:
+@Returns:
 
 
 <!-- ##### FUNCTION gdk_pixbuf_get_bits_per_sample ##### -->
@@ -56,8 +61,8 @@ gdk-pixbuf
 
 </para>
 
-@pixbuf: 
-@Returns: 
+@pixbuf:
+@Returns:
 
 
 <!-- ##### FUNCTION gdk_pixbuf_get_pixels ##### -->
@@ -65,8 +70,8 @@ gdk-pixbuf
 
 </para>
 
-@pixbuf: 
-@Returns: 
+@pixbuf:
+@Returns:
 
 
 <!-- ##### FUNCTION gdk_pixbuf_get_width ##### -->
@@ -74,8 +79,8 @@ gdk-pixbuf
 
 </para>
 
-@pixbuf: 
-@Returns: 
+@pixbuf:
+@Returns:
 
 
 <!-- ##### FUNCTION gdk_pixbuf_get_height ##### -->
@@ -83,8 +88,8 @@ gdk-pixbuf
 
 </para>
 
-@pixbuf: 
-@Returns: 
+@pixbuf:
+@Returns:
 
 
 <!-- ##### FUNCTION gdk_pixbuf_get_rowstride ##### -->
@@ -92,7 +97,12 @@ gdk-pixbuf
 
 </para>
 
-@pixbuf: 
-@Returns: 
-
+@pixbuf:
+@Returns:
 
+<!--
+Local variables:
+mode: sgml
+sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
+End:
+-->
index a615cc27bae7eb83eb49bb425bdd28819f760ea0..595322a37f6e52820e21047864065b7ec367d157 100644 (file)
@@ -9,13 +9,11 @@ GnomeCanvasPixbuf
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### MACRO GNOME_CANVAS_PIXBUF ##### -->
 <para>
 
index ec2b62d0b858dc6ae6033eea8bfcd6aca57aa271..63f1121aea6954561edb4b582c796f8b5bb691ff 100644 (file)
@@ -1,25 +1,30 @@
 <!-- ##### SECTION Title ##### -->
-refcounting
+Reference Counting
 
 <!-- ##### SECTION Short_Description ##### -->
-
+Functions to perform reference counting on a #GdkPixbuf.
 
 <!-- ##### SECTION Long_Description ##### -->
-<para>
-
-</para>
-
+  <para>
+    #GdkPixbuf structures are reference counted.  This means that
+    an application can share a single pixbuf among many parts of the
+    code.  When a piece of the program needs to keep a pointer to a
+    pixbuf, it should add a reference to it.  When it no longer needs
+    the pixbuf, it should subtract a reference.  The pixbuf will be
+    destroyed when its reference count drops to zero.  Newly-created
+    #GdkPixbuf structures start with a reference count of one.
+  </para>
 
 <!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
+  <para>
+    #GdkPixbuf
+    #ArtPixBuf
+  </para>
 
 <!-- ##### FUNCTION gdk_pixbuf_ref ##### -->
-<para>
+  <para>
 
-</para>
+  </para>
 
 @pixbuf: 
 
@@ -32,3 +37,9 @@ refcounting
 @pixbuf: 
 
 
+<!--
+Local variables:
+mode: sgml
+sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
+End:
+-->
index 0576a730b955813238ee0f5ddba4e9a30b14e828..e70a79d8923030528fd2eb6d6a901c93fa2f2b53 100644 (file)
@@ -9,13 +9,11 @@ rendering
 
 </para>
 
-
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
-
 <!-- ##### ENUM GdkPixbufAlphaMode ##### -->
 <para>
 
index d1bc556de34fc30df4fa2f849259ffa1b877c213..e1d0c55814a9660ae92e70be3cbf12904d083e42 100644 (file)
@@ -1,5 +1,16 @@
 1999-11-04  Federico Mena Quintero  <federico@redhat.com>
 
+       * doc/tmpl/gdk-pixbuf.sgml: Populated.
+
+       * doc/tmpl/refcounting.sgml: Populated.
+
+       * doc/tmpl/file-loading.sgml: Populated.
+
+       * src/gdk-pixbuf.c: Added documentation comments.
+
+       * src/gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): Added
+       documentation comments.
+
        * doc/: Finished integrating the documentation framework.
 
 1999-11-03  Federico Mena Quintero  <federico@redhat.com>
index e2b692f6d9360476ced9e5e11ae4a00ac0f44ef8..64ddd1b563b96a7db1f785d1ae0466bbdef1ebb8 100644 (file)
@@ -221,6 +221,18 @@ gdk_pixbuf_get_module (gchar *buffer, gint size)
        return NULL;
 }
 
+/**
+ * gdk_pixbuf_new_from_file:
+ * @filename: Name of file to load.
+ * 
+ * Creates a new pixbuf by loading an image from a file.  The file format is
+ * detected automatically.
+ * 
+ * Return value: A newly-created pixbuf, or NULL if any of several error
+ * conditions occurred:  the file could not be opened, there was no loader for
+ * the file's format, there was not enough memory to allocate the image buffer,
+ * or the image file contained invalid data.
+ **/
 GdkPixbuf *
 gdk_pixbuf_new_from_file (const char *filename)
 {
index cc0d8412912e087ddf41a822c11bf8ab2edd81c4..b1ff7f65376910fc24114f5a4c4641680c6751e2 100644 (file)
@@ -107,6 +107,10 @@ free_buffer (gpointer user_data, gpointer data)
        free (data);
 }
 
+\f
+
+/* Create an empty pixbuf */
+
 /**
  * gdk_pixbuf_new:
  * @format: Image format.
@@ -114,11 +118,11 @@ free_buffer (gpointer user_data, gpointer data)
  * @bits_per_sample: Number of bits per color sample.
  * @width: Width of image in pixels.
  * @height: Height of image in pixels.
- * 
+ *
  * Creates a new &GdkPixbuf structure and allocates a buffer for it.  The buffer
  * has an optimal rowstride.  Note that the buffer is not cleared; you will have
  * to fill it completely.
- * 
+ *
  * Return value: A newly-created &GdkPixbuf, or NULL if not enough memory
  * could be allocated for the image buffer.
  **/
@@ -148,8 +152,18 @@ gdk_pixbuf_new (ArtPixFormat format, gboolean has_alpha, int bits_per_sample,
                                         free_buffer, NULL);
 }
 
+\f
 
 /* Convenience functions */
+
+/**
+ * gdk_pixbuf_get_format:
+ * @pixbuf: A pixbuf.
+ *
+ * Queries the image format (color model) of a pixbuf.
+ *
+ * Return value: Image format.
+ **/
 ArtPixFormat
 gdk_pixbuf_get_format (GdkPixbuf *pixbuf)
 {
@@ -160,6 +174,14 @@ gdk_pixbuf_get_format (GdkPixbuf *pixbuf)
        return (pixbuf->art_pixbuf->format);
 }
 
+/**
+ * gdk_pixbuf_get_n_channels:
+ * @pixbuf: A pixbuf.
+ *
+ * Queries the number of channels of a pixbuf.
+ *
+ * Return value: Number of channels.
+ **/
 int
 gdk_pixbuf_get_n_channels (GdkPixbuf *pixbuf)
 {
@@ -169,6 +191,14 @@ gdk_pixbuf_get_n_channels (GdkPixbuf *pixbuf)
        return (pixbuf->art_pixbuf->n_channels);
 }
 
+/**
+ * gdk_pixbuf_get_has_alpha:
+ * @pixbuf: A pixbuf.
+ *
+ * Queries whether a pixbuf has an alpha channel (opacity information).
+ *
+ * Return value: TRUE if it has an alpha channel, FALSE otherwise.
+ **/
 int
 gdk_pixbuf_get_has_alpha (GdkPixbuf *pixbuf)
 {
@@ -178,6 +208,14 @@ gdk_pixbuf_get_has_alpha (GdkPixbuf *pixbuf)
        return (pixbuf->art_pixbuf->has_alpha);
 }
 
+/**
+ * gdk_pixbuf_get_bits_per_sample:
+ * @pixbuf: A pixbuf.
+ *
+ * Queries the number of bits per color sample in a pixbuf.
+ *
+ * Return value: Number of bits per color sample.
+ **/
 int
 gdk_pixbuf_get_bits_per_sample (GdkPixbuf *pixbuf)
 {
@@ -187,6 +225,14 @@ gdk_pixbuf_get_bits_per_sample (GdkPixbuf *pixbuf)
        return (pixbuf->art_pixbuf->bits_per_sample);
 }
 
+/**
+ * gdk_pixbuf_get_pixels:
+ * @pixbuf: A pixbuf.
+ *
+ * Queries a pointer to the pixel data of a pixbuf.
+ *
+ * Return value: A pointer to the pixbuf's pixel data.
+ **/
 guchar *
 gdk_pixbuf_get_pixels (GdkPixbuf *pixbuf)
 {
@@ -196,6 +242,14 @@ gdk_pixbuf_get_pixels (GdkPixbuf *pixbuf)
        return (pixbuf->art_pixbuf->pixels);
 }
 
+/**
+ * gdk_pixbuf_get_width:
+ * @pixbuf: A pixbuf.
+ *
+ * Queries the width of a pixbuf.
+ *
+ * Return value: Width in pixels.
+ **/
 int
 gdk_pixbuf_get_width (GdkPixbuf *pixbuf)
 {
@@ -205,6 +259,14 @@ gdk_pixbuf_get_width (GdkPixbuf *pixbuf)
        return (pixbuf->art_pixbuf->width);
 }
 
+/**
+ * gdk_pixbuf_get_height:
+ * @pixbuf: A pixbuf.
+ *
+ * Queries the height of a pixbuf.
+ *
+ * Return value: Height in pixels.
+ **/
 int
 gdk_pixbuf_get_height (GdkPixbuf *pixbuf)
 {
@@ -214,6 +276,14 @@ gdk_pixbuf_get_height (GdkPixbuf *pixbuf)
        return (pixbuf->art_pixbuf->height);
 }
 
+/**
+ * gdk_pixbuf_get_rowstride:
+ * @pixbuf: A pixbuf.
+ *
+ * Queries the rowstride of a pixbuf, or the number of bytes between rows.
+ *
+ * Return value: Number of bytes between rows.
+ **/
 int
 gdk_pixbuf_get_rowstride (GdkPixbuf *pixbuf)
 {